<extend name="Common@Layout:base" />
<block name="title">
    <title>
        <if condition="LANG_SET eq 'zh-cn'">账户激活
            <else/>Account activation</if>
    </title>
</block>
<block name="style">
</block>

<block name="main">
    <include file="Common@Include:header" />

    <div class="main layui-clear">
        <div class="fly-panel">
            <div class="fly-none">
                <br><br>
                <if condition="$result['code'] eq 1">
                    <i class="layui-icon" style="font-size:100px;color:green"></i>
                    <p>
                        <if condition="LANG_SET eq 'zh-cn'">
                            恭喜你，账户激活成功~
                            <else/> Congratulations, account activation is successful !
                        </if>
                    </p>
                    <br>

                    <a href="/" class="layui-btn">
                        <if condition="LANG_SET eq 'zh-cn'">
                            立即跳转到首页
                            <else/> Jump to the home page
                        </if>
                        <span id="time">5</span>s ~
                    </a>
                    <else/>
                    <i class="layui-icon" style="font-size:100px;color:red">ဆ</i>
                    <p>
                        <if condition="LANG_SET eq 'zh-cn'">
                            对不起，账户激活失败
                            <else/> Sorry , account activation is unsuccessful ！
                        </if>
                    </p>
                    <p>
                        <a href="/user/login.html" style="width:120px;" class="layui-btn layui-btn-radius">{:L('login')}</a>
                        <a href="/user/reg.html" style="width:120px;" class="layui-btn layui-btn-normal layui-btn-radius">{:L('reg')}</a>
                    </p>
                </if>


            </div>
        </div>
    </div>

    <include file="Common@Include:footer" />
</block>

<block name="script">
    <script>
        layui.use(['jquery'], function() {
            var $ = layui.jquery;

            $(function() {
                setInterval(ChangeTime, 1000);
            });

            function ChangeTime() {
                var time;
                time = $("#time").text();
                time = parseInt(time);
                time--;
                if (time <= 0) {
                    window.location.href = "/";
                } else {
                    $("#time").text(time);
                }
            }
        });
    </script>
</block>